﻿using System.Collections.Generic;
using Glue;
using Xunit;

namespace GlueTests.AutoRelaterTests
{
    public class When_automatically_relation_between_lists
    {
        public class DomainPerson
        {
            public int[] Numbers { get; set; }
            public List<string> ListOfStrings { get; set; }
        }
        public class GuiPerson
        {
            public List<int> Numbers { get; set; }
            public List<string> ListOfStrings { get; set; }
        }

        [Fact]
        public void Should_relate_different_lists_on_equal_names()
        {
            var mapping = new Mapping<DomainPerson, GuiPerson>();
            mapping.AutoRelateEqualNames();
            Assert.Equal(2, mapping.Relations.Count);
        }
    }
}
